all: celex exceptions G2P
celex: celex.idx celex.dict
	sort -T . celex.dict | tr '!' '\000' > celex
celex.idx: celex.dict
	sort -T . celex.dict | ../../bin/mul/index > celex.idx
exceptions: exceptions.idx exceptions.dict exceptionsNoVariants.dict
	sort exceptions.dict | tr '!' '\000' > exceptions
exceptions.idx: exceptions.dict exceptionsNoVariants.dict
	sort exceptions.dict | ../../bin/mul/index > exceptions.idx
exceptions.dict: exceptionsNoVariants.dict makefile
	sort exceptionsNoVariants.dict|gawk -f ../../bin/mul/uniq1 FS="!" OFS="!" |\
	gawk '/!!/{sub(/!/,"!<(>");\
	           gsub(/!!/,"<|>");\
                   sub(/!$$/,"<)>!")}\
              {print}' > exceptions.dict
G2P: weka .G2Pcompiled celexeng100000.j48-m20.model header.arff
.G2Pcompiled: G2P.java weka
	javac G2P.java
	touch .G2Pcompiled
weka: weka.jar 
	jar xvf weka.jar > /dev/null
clean:
	rm -rf celex celex.idx exceptions exceptions.idx exceptions.dict weka META-INF .G2Pcompiled

